package GUI;


import java.awt.*;

import javax.swing.JButton;
import javax.swing.JPanel;

/**
 * Class for creation prototype for right side panels(PanelFunctions)
 * @author Andrey
 *
 */
public class PanelFunctionsEmpty extends JPanel 
{

private MainMenu mainMenu;
	
public PanelFunctionsEmpty(MainMenu mm)
{
	super();
	this.mainMenu=mm;
	this.setBackground(new Color(204, 204, 204));                 
	this.setPreferredSize(new Dimension(220, 500));               
	this.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));	
	this.add(getKeyBoardBtn());
}	



public PanelFunctionsEmpty()
{
	super();
	this.setBackground(new Color(204, 204, 204));                 
	this.setPreferredSize(new Dimension(220, 500));               
	this.setLayout(new FlowLayout(FlowLayout.CENTER, 0, 0));	
}	




private JButton getKeyBoardBtn()
{
	JButton keyboard=new JButton("מקלדת");
	keyboard.addActionListener(new java.awt.event.ActionListener() {
		public void actionPerformed(java.awt.event.ActionEvent e) {		
			if (((BorderLayout)mainMenu.getContentPane().getLayout()).getLayoutComponent(BorderLayout.SOUTH).isVisible())
			{
				((BorderLayout)mainMenu.getContentPane().getLayout()).getLayoutComponent(BorderLayout.SOUTH).setVisible(false);
			mainMenu.getContentPane().validate();
			}
			else
			{
			((BorderLayout)mainMenu.getContentPane().getLayout()).getLayoutComponent(BorderLayout.SOUTH).setVisible(true);
		    mainMenu.getContentPane().validate();
			}
				
		}
	});

	
	
	return keyboard;
}




}